export enum ConfigOperate {
  Add,
  Edit,
}

export type ConfigProps = {
  id?: number;
  dsType?: string;
  valueName?: string;
  value?: string;
  status?: 1 | 2;
  url?: string;
  customParams?: string;
  dsName?: string;
};

export type AddConfigProps = Omit<ConfigProps, 'id' | 'operator'>;
export type EditConfigProps = Omit<ConfigProps, 'operator'>;


export const sourceList = [
  {
    groupName: "NoSQL",
    datasourceList: [
      {
        img: "https://img.alicdn.com/tfs/TB1qioYvy_1gK0jSZFqXXcpaXXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/610689.html",
          writer: "https://help.aliyun.com/document_detail/610689.html",
        },
        disabled: false,
        text: "MongoDB",
        type: "mongodb",
      },
      {
        onlyDiScript: false,
        doc: {
          writer: "https://help.aliyun.com/document_detail/610186.html",
        },
        text: "Memcache（OCS）",
        type: "ocs",
      },
      {
        onlyDiScript: false,
        doc: {
          writer: "https://help.aliyun.com/document_detail/612570.html",
        },
        text: "Redis",
        type: "redis",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/612186.html",
          writer: "https://help.aliyun.com/document_detail/612186.html",
        },
        text: "OTS",
        type: "ots",
      },
      {
        onlyDiScript: false,
        doc: {
          writer: "https://help.aliyun.com/document_detail/611584.html",
        },
        text: "Graph Database",
        type: "gdb",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1zvEUvxD1gK0jSZFsXXbldVXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611489.html",
          writer: "https://help.aliyun.com/document_detail/611489.html",
        },
        disabled: false,
        text: "Elasticsearch",
        type: "elasticsearch",
      },
    ],
  },
  {
    groupName: "SaaS",
    datasourceList: [
      {
        img: "https://img.alicdn.com/imgextra/i3/O1CN01rnb68J1NOz9DLNX9n_!!6000000001561-2-tps-225-225.png",
        onlyDiScript: false,
        doc: {
          reader:
            "https://help.aliyun.com/zh/dataworks/user-guide/salesforce-data-source",
        },
        disabled: false,
        text: "Salesforce",
        type: "salesforce",
      },
    ],
  },
  {
    groupName: "半结构化存储",
    datasourceList: [
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/610992.html",
          writer: "https://help.aliyun.com/document_detail/610992.html",
        },
        text: "OSS",
        type: "oss",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611600.html",
          writer: "https://help.aliyun.com/document_detail/611600.html",
        },
        text: "HDFS",
        type: "hdfs",
      },
      {
        img: "https://img.alicdn.com/tfs/TB17SMTvvb2gK0jSZK9XXaEgFXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611572.html",
          writer: "https://help.aliyun.com/document_detail/611572.html",
        },
        disabled: false,
        text: "FTP",
        type: "ftp",
      },
      {
        img: "https://img.alicdn.com/imgextra/i4/O1CN01N9qKv11R4bnQScIia_!!6000000002058-2-tps-280-174.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/610304.html",
        },
        disabled: false,
        text: "S3",
        type: "s3",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: null,
          writer: null,
        },
        text: "OSS-HDFS",
        type: "oss_hdfs",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "${offline_task_config_help_doc_url_http_file}",
        },
        text: "HttpFile",
        type: "httpfile",
      },
      {
        onlyDiScript: false,
        doc: {
          reader:
            "https://help.aliyun.com/zh/dataworks/user-guide/azureblob-data-source",
        },
        text: "Azure Blob Storage",
        type: "azureblob",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1iUCiunM11u4jSZPxXXahcXXa-533-362.jpg",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/612565.html",
          writer: "https://help.aliyun.com/document_detail/612565.html",
        },
        disabled: false,
        text: "RestAPI",
        type: "restapi",
      },
    ],
  },
  {
    groupName: "消息队列",
    datasourceList: [
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/609950.html",
          writer: "https://help.aliyun.com/document_detail/609950.html",
        },
        text: "LogHub",
        type: "loghub",
      },
      {
        img: "https://img.alicdn.com/imgextra/i2/O1CN01NJgUKj1DS3PoK0N0b_!!6000000000214-2-tps-280-174.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611604.html",
          writer: "https://help.aliyun.com/document_detail/611604.html",
        },
        disabled: false,
        text: "Kafka",
        type: "kafka",
      },
    ],
  },
  {
    groupName: "其他",
    datasourceList: [
      {
        type: "ssh",
      },
    ],
  },
  {
    groupName: "大数据存储",
    datasourceList: [
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/609966.html",
          writer: "https://help.aliyun.com/document_detail/609966.html",
        },
        text: "MaxCompute",
        type: "odps",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611303.html",
          writer: "https://help.aliyun.com/document_detail/611303.html",
        },
        text: "DataHub",
        type: "datahub",
      },
      {
        type: "dla",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/612181.html",
          writer: "https://help.aliyun.com/document_detail/612181.html",
        },
        text: "Vertica",
        type: "vertica",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611574.html",
          writer: "https://help.aliyun.com/document_detail/611574.html",
        },
        text: "GBase8a",
        type: "gbase8a",
      },
      {
        img: "https://img.alicdn.com/tfs/TB18mZHwUz1gK0jSZLeXXb9kVXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611601.html",
          writer: "https://help.aliyun.com/document_detail/611601.html",
        },
        disabled: false,
        text: "Hive",
        type: "hive",
      },
      {
        img: "https://img.alicdn.com/tfs/TB10_kUvxz1gK0jSZSgXXavwpXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611598.html",
          writer: "https://help.aliyun.com/document_detail/611598.html",
        },
        disabled: false,
        text: "HBase",
        type: "hbase",
      },
      {
        img: "https://img.alicdn.com/imgextra/i3/O1CN01Y2eyQm1MqAsbff9AP_!!6000000001485-2-tps-280-174.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/612514.html",
          writer: "https://help.aliyun.com/document_detail/612514.html",
        },
        disabled: false,
        text: "StarRocks",
        type: "starrocks",
      },
      {
        type: "dlf",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1fJAIw1bviK0jSZFNXXaApXXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611602.html",
          writer: "https://help.aliyun.com/document_detail/611602.html",
        },
        disabled: false,
        text: "Hologres",
        type: "holo",
      },
      {
        img: "https://img.alicdn.com/imgextra/i4/O1CN01eF5DaI1ejuT1TWJ4O_!!6000000003908-0-tps-557-364.jpg",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/612558.html",
          writer: "https://help.aliyun.com/document_detail/612558.html",
        },
        disabled: false,
        text: "KingbaseES",
        type: "kingbasees",
      },
      {
        img: "https://img.alicdn.com/imgextra/i4/O1CN01Gqqy0q217CABH3bG4_!!6000000006937-2-tps-280-176.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611266.html",
          writer: "https://help.aliyun.com/document_detail/611266.html",
        },
        disabled: false,
        text: "ClickHouse",
        type: "clickhouse",
      },
      {
        img: "https://img.alicdn.com/imgextra/i4/O1CN01kTK8Qt1wxnkkTBoxS_!!6000000006375-0-tps-280-176.jpg",
        onlyDiScript: false,
        doc: {
          reader: "${offline_task_config_reader_help_polardb}",
          writer: "https://help.aliyun.com/document_detail/2362488.html",
        },
        disabled: false,
        text: "Doris",
        type: "doris",
      },
      {
        img: "https://img.alicdn.com/imgextra/i3/O1CN01A8h5fH1LllYxiGAJx_!!6000000001340-0-tps-280-176.jpg",
        onlyDiScript: false,
        doc: {
          writer: "https://help.aliyun.com/document_detail/2328649.html",
        },
        disabled: false,
        text: "SelectDB",
        type: "selectdb",
      },
      {
        img: "https://img.alicdn.com/imgextra/i4/O1CN01NtdjVC1kECmU2FdqX_!!6000000004651-2-tps-280-174.png",
        onlyDiScript: false,
        doc: {
          reader: null,
          writer: null,
        },
        disabled: false,
        text: "Phoenix",
        type: "phoenix",
      },
      {
        img: "https://img.alicdn.com/imgextra/i1/O1CN010V3gGY1cumr2qzYTt_!!6000000003661-2-tps-280-176.png",
        onlyDiScript: false,
        doc: {
          reader:
            "https://help.aliyun.com/document_detail/611606.html#task-2089116",
          writer:
            "https://help.aliyun.com/document_detail/611606.html#task-2089262",
        },
        disabled: false,
        text: "Lindorm",
        type: "lindorm",
      },
      {
        img: "https://img.alicdn.com/imgextra/i4/O1CN01maVooo26E8ICLzWOh_!!6000000007629-2-tps-280-174.png",
        disabled: false,
        text: "Sensors Data",
        type: "sa",
      },
    ],
  },
  {
    groupName: "关系型数据库",
    datasourceList: [
      {
        onlyDiScript: false,
        doc: {
          reader:
            "https://help.aliyun.com/zh/dataworks/user-guide/polardbx20-data-source",
          writer:
            "https://help.aliyun.com/zh/dataworks/user-guide/polardbx20-data-source",
        },
        text: "PolarDB-X 2.0",
        type: "polardbx20",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1KMoVvAP2gK0jSZPxXXacQpXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/608116.html",
          writer: "https://help.aliyun.com/document_detail/608116.html",
        },
        disabled: false,
        text: "MySQL",
        type: "mysql",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1W2AUvxD1gK0jSZFsXXbldVXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/612190.html",
          writer: "https://help.aliyun.com/document_detail/612190.html",
        },
        disabled: false,
        text: "SQL Server",
        type: "sqlserver",
      },
      {
        img: "https://img.alicdn.com/tfs/TB12eQ3vBr0gK0jSZFnXXbRRXXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/612572.html",
          writer: "https://help.aliyun.com/document_detail/612572.html",
        },
        disabled: false,
        text: "PostgreSQL",
        type: "postgresql",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1HUoQvqL7gK0jSZFBXXXZZpXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/610793.html",
          writer: "https://help.aliyun.com/document_detail/610793.html",
        },
        disabled: false,
        text: "Oracle",
        type: "oracle",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611354.html",
          writer: "https://help.aliyun.com/document_detail/611354.html",
        },
        text: "DM",
        type: "dm",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611488.html",
          writer: "https://help.aliyun.com/document_detail/611488.html",
        },
        text: "DRDS",
        type: "drds",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1OmM0vq61gK0jSZFlXXXDKFXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611909.html",
          writer: "https://help.aliyun.com/document_detail/611909.html",
        },
        disabled: false,
        text: "PolarDB",
        type: "polardb",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611603.html",
          writer: "https://help.aliyun.com/document_detail/611603.html",
        },
        text: "HybridDB for MySQL",
        type: "hybriddb_for_mysql",
      },
      {
        img: "https://img.alicdn.com/tfs/TB10fQ1vrj1gK0jSZFuXXcrHpXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611192.html",
          writer: "https://help.aliyun.com/document_detail/611192.html",
        },
        disabled: false,
        text: "AnalyticDB for PostgreSQL",
        type: "hybriddb_for_postgresql",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/610751.html",
          writer: "https://help.aliyun.com/document_detail/610751.html",
        },
        text: "AnalyticDB for MySQL (V2.0)",
        type: "ads",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/610904.html",
          writer: "https://help.aliyun.com/document_detail/610904.html",
        },
        text: "AnalyticDB for MySQL (V3.0)",
        type: "analyticdb_for_mysql",
      },
      {
        onlyDiScript: false,
        doc: {
          reader:
            "https://help.aliyun.com/zh/dataworks/user-guide/polardbx20-data-source",
          writer:
            "https://help.aliyun.com/zh/dataworks/user-guide/polardbx20-data-source",
        },
        text: "PolarDB-O",
        type: "polardbo",
      },
      {
        onlyDiScript: false,
        doc: {
          reader: "${offline_task_config_help_tidb}",
        },
        text: "TiDB",
        type: "tidb",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1zFBUqCslXu8jSZFuXXXg7FXa-631-400.jpg",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/612558.html",
          writer: "https://help.aliyun.com/document_detail/612558.html",
        },
        disabled: false,
        text: "SAP HANA",
        type: "saphana",
      },
      {
        img: "https://img.alicdn.com/imgextra/i1/O1CN01RbYqZK1xs8I5BCvmg_!!6000000006498-2-tps-280-176.png",
        onlyDiScript: false,
        doc: {
          reader: "",
          writer: "",
        },
        disabled: false,
        text: "MariaDB",
        type: "mariadb",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1hF8uvSf2gK0jSZFPXXXsopXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611335.html",
          writer: "https://help.aliyun.com/document_detail/611335.html",
        },
        disabled: false,
        text: "DB2",
        type: "db2",
      },
      {
        img: "https://img.alicdn.com/tfs/TB1ZwQZvxv1gK0jSZFFXXb0sXXa-140-87.png",
        onlyDiScript: false,
        doc: {
          reader: "https://help.aliyun.com/document_detail/611238.html",
          writer: "https://help.aliyun.com/document_detail/611238.html",
        },
        disabled: false,
        text: "ApsaraDB for OceanBase",
        type: "apsaradb_for_oceanbase",
      },
      {
        img: "https://img.alicdn.com/imgextra/i1/O1CN01rPCYDx1yiLeOBBmhQ_!!6000000006612-2-tps-280-176.png",
        onlyDiScript: false,
        doc: {
          reader: null,
          writer: null,
        },
        disabled: false,
        text: "Amazon Redshift",
        type: "redshift",
      },
    ],
  },
];